package com.yang.designmode.ActionMode.observer;

public class Client {
    public static void main(String[] args) {
        ConcreteSubject subject = new ConcreteSubject();

        Observer observer1 = new ConcreteObserver("观察者1");
        Observer observer2 = new ConcreteObserver("观察者2");

        subject.registerObserver(observer1);
        subject.registerObserver(observer2);

        subject.someBusinessLogic();

        subject.removeObserver(observer1);
        subject.someBusinessLogic();
    }
}

